package com.xxx.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxx.article.domain.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author blijojo
 */
@Mapper
public interface ArticleMapper extends BaseMapper<Article> {
    /**
     * 根据id查询点赞数
     *
     * @param articleId 文章id
     * @return 点赞数
     */
    Integer selectThumbUpById(@Param("articleId") String articleId);

    /**
     * 根据文章id查询作者id
     *
     * @param id 文章id
     * @return 作者id
     */
    String findUserIdById(@Param("id") String id);

}
